package com.deep.schedule.entity;

/**
 * @author Deep
 * @date 2021/10/5 12:46
 */
public class Work {
    String name; //进程名
    float arriveTime; //到达时间
    float startTime; //开始时间
    float runTime; //服务时间
    float finishTime; //完成时间
    float turnaroundTime; //周转时间
    float averageTurnaroundTime; //平均周转时间
    float weightedTurnaroundTime; //带权周转时间
    float averageWeightedTurnaroundTime; //平均带权周转时间
    boolean flag = false;   // 判断当前作业是否完成

    public Work() {
    }

    public Work(String name, float arriveTime, float runTime) {
        this.name = name;
        this.arriveTime = arriveTime;
        this.runTime = runTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public float getArriveTime() {
        return arriveTime;
    }

    public void setArriveTime(float arriveTime) {
        this.arriveTime = arriveTime;
    }

    public float getStartTime() {
        return startTime;
    }

    public void setStartTime(float startTime) {
        this.startTime = startTime;
    }

    public float getRunTime() {
        return runTime;
    }

    public void setRunTime(float runTime) {
        this.runTime = runTime;
    }

    public float getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(float finishTime) {
        this.finishTime = finishTime;
    }

    public float getTurnaroundTime() {
        return turnaroundTime;
    }

    public void setTurnaroundTime(float turnaroundTime) {
        this.turnaroundTime = turnaroundTime;
    }

    public float getAverageTurnaroundTime() {
        return averageTurnaroundTime;
    }

    public void setAverageTurnaroundTime(float averageTurnaroundTime) {
        this.averageTurnaroundTime = averageTurnaroundTime;
    }

    public float getWeightedTurnaroundTime() {
        return weightedTurnaroundTime;
    }

    public void setWeightedTurnaroundTime(float weightedTurnaroundTime) {
        this.weightedTurnaroundTime = weightedTurnaroundTime;
    }

    public float getAverageWeightedTurnaroundTime() {
        return averageWeightedTurnaroundTime;
    }

    public void setAverageWeightedTurnaroundTime(float averageWeightedTurnaroundTime) {
        this.averageWeightedTurnaroundTime = averageWeightedTurnaroundTime;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    @Override
    public String toString() {
        return "Work{" +
                "name='" + name + '\'' +
                ", arriveTime=" + arriveTime +
                ", startTime=" + startTime +
                ", runTime=" + runTime +
                ", finishTime=" + finishTime +
                ", flag=" + flag +
                '}';
    }
}
